package com.maslyk.invitation.to;

import java.util.Calendar;
import java.util.Date;

import com.maslyk.invitation.BeanService;
import com.maslyk.invitation.entitybean.Salesman;

public class AuditLogSearchCriteria {
	
	private Salesman salesman;
	private Date dateFrom;
	private Date dateTo = new Date();
	private String searchKey;
	
	public AuditLogSearchCriteria(){
		CurrentUserTO currentUser = (CurrentUserTO) BeanService.getSessionScopeBean("currentUserTO");
		salesman = currentUser.getCurrentSalesman();
		
		Calendar datefrm = Calendar.getInstance();
		datefrm.add(Calendar.DATE, -2);
		dateFrom = datefrm.getTime();
	}
	
	public Salesman getSalesman() {
		return salesman;
	}
	public void setSalesman(Salesman salesman) {
		this.salesman = salesman;
	}
	public Date getDateFrom() {
		return dateFrom;
	}
	public void setDateFrom(Date dateFrom) {
		this.dateFrom = dateFrom;
	}
	public Date getDateTo() {
		return dateTo;
	}
	public void setDateTo(Date dateTo) {
		this.dateTo = dateTo;
	}

	public String getSearchKey() {
		return searchKey;
	}

	public void setSearchKey(String searchKey) {
		this.searchKey = searchKey;
	}
}
